<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Class Report extends MY_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->checkAdmin($this->session->userdata('admin_id'));
        $this->data['controller'] = 'report';         
        $this->load->model('Mreport');
    }
    
    public function index()
    {
        $this->data['id']           = $this->getParamInt('id');
        $this->data['listcrew']     = $this->Mreport->getListCrew($this->data['id']);
        $this->data['times']        = $this->getParamString('times');
        
        $this->data['info']         = $this->Mreport->getInfoStaff($this->data['id']);
        $this->data['dataReport']   = $this->Mreport->getDataReport($this->data['id'], $this->data['times']);
        //echo "<pre>";
        //die(print_r($this->data['dataReport']));
        $this->data['action']       = __FUNCTION__;
        $this->load->view('temp/layout', $this->data);
    }
    
}
